from django.conf import settings
from django.test import TestCase
import os
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'meiduo_mall.settings.dev')

# Create your tests here.
from itsdangerous import TimedJSONWebSignatureSerializer
if __name__ == '__main__':
    obj = TimedJSONWebSignatureSerializer(settings.SECRET_KEY,expires_in=600)
    dict = {
        'name':'as'
    }
    av = obj.dumps(dict)
    av = av.decode()
    print(av)
    data = obj.loads(av)
    print(data)